package cn.qlu.yhy.dao;

import java.util.List;

import cn.qlu.yhy.model.User;
import cn.qlu.yhy.model.enumpack.Role;

public interface IUserDao {

    // get user by user id
    public User getUserByUserId(int userId);

    // get user by username and password
    public User getUserByUserNamePassword (String username, String password);

    // get user by username
    public User getUserByName(String userName);

    // get user by nickname
    public User getUserByNickname(String nickname);

    // judge user is exist by username
    public boolean getUserExistByUserName(String userName);

    // judge user is exist by nickname
    public boolean getUserExistByNickname(String nickname);

    // find all user
    public List<User> findUsers();

    // find user by role
    public List<User> findUsersByRole(Role role);

    // create user by user
    public boolean createUser(User user);

    // delete user by user id
    public boolean deleteUser(int userId);

    // update user by user
    public boolean updateUser(User user);



}
